<div class="pt60">
<header class="bg1">
	<span class="return"><a ng-click="$location.back()" href=""><img src="img/11.png"/></a></span>
	<p class="title">质量记录</p>
	<span class="txt1"><a ng-click="save()" href="">保存</a></span><span class="nochoose"><a ng-click="submit()" href="">提交</a></span>
</header>
<section class="mt10">
<form name="form" novalidate="novalidate">
	<ul class="list-3">
		<li class="clearfix">
			<span class="l"><img src="img/i-xq-14.jpg"/>标题</span>
			<span class="r">
				<input type="text" ng-model="newItem.title" name="title" required class="fromtxt" placeholder="最多支持150个字符"/>
				<span style="color:red" ng-show="form.title.$dirty && form.title.$invalid">
			<small ng-show="form.title.$error.maxLength">标题长度不能超过150</small>
				<small ng-show="form.title.$error.required">标题不能为空</small>
 			</span>
			</span>
		</li>
		<li class="clearfix">
			<span class="l"><img src="img/i-xq-3.jpg"/>报表类型</span>
			<span class="r">
				<select class="fromtxt" ng-model="newItem.docType" required ng-options="docType.id as docType.v for docType in docTypes" required="required" name="reportType"></select>
				<span style="color:red" ng-show="form.reportType.$dirty && form.reportType.$invalid">
				<small ng-show="form.reportType.$error.required">报表类型不能为空</small>
 			</span>
			</span>
		</li>
		<li class="clearfix">
			<span class="l"><img src="img/i-xq-1.jpg"/>构件编码</span>
			<span class="rr"><input ng-model="newItem.compId" name="compId" maxlength="50" required="required" class="fromtxt" placeholder="请输入构件编码" onchange="angular.element(this).scope().onCompIdChange()"/>
			<span style="color:red" ng-show="form.compId.$dirty">
				<small ng-show="form.compId.$error.maxLength">构建编码长度不能超过50</small>
				<small ng-show="form.compId.$error.required">构建编码无效</small>
				<small ng-show="!form.compId.$error.required && (!newItem.component || !newItem.component.name)">构建编码无效</small>
 			</span>
			</span>
			<span class="ll"><a ng-click="scan()" href=""><img src="img/scan.png"/></a></span>
		</li>
		<li class="clearfix">
			<span class="t"><img src="img/i-xq-2.jpg"/>构建信息</span>
			<div class="warp">
	            <p class="tp"><span>名称：</span>{{newItem.component.name}}</p>
	            <p class="tp"><span>设计：</span>{{newItem.component.designer}}</p>
	            <p class="tp"><span>施工：</span>{{newItem.component.constructor}}</p>
	            <p class="tp"><span>监理：</span>{{newItem.component.supervisor}}</p>
	            <p class="tp" ng-repeat="(k, v) in newItem.component.properties">
            <span>{{k}}：</span>{{v}}
        	</p>
            </div>
		</li>
		<li class="clearfix">
			<span class="l"><img src="img/i-xq-3.jpg"/>工序</span>
			<span class="r"><textarea name="stage" maxlength="150" type="text" ng-model="newItem.stageOfProduction" required class="fromtxt" placeholder="您还可以输入150个字符"/><span style="color:red" ng-show="form.stage.$dirty && form.stage.$invalid">
			<small ng-show="form.stage.$error.maxLength">工序长度不能超过150</small>
				<small ng-show="form.stage.$error.required">工序不能为空</small>
 			</span>
			</span>
		</li>
		<li class="clearfix">
			<span class="l"><img src="img/i-xq-5.jpg"/>相片</span>
			<span class="r pr">
				<span ng-repeat="pic in newItem.picAttachmentList" class="pic" style="margin-right:5px;">
					<img ng-src="{{pic.thumbnailUrl}}" style="width:100%; vertical-align:bottom;margin-bottom:0;" my-touch-remove="removeImage(pic.fileUrl)"/>
				</span>
				<my-media-selector src="img/i-jia.jpg" class="pic" type="img" change="imageChanged($uri)"></my-media-selector>
			</span>
		</li>
	</ul>
	</form>
</section>
</div>
